Let $I = \int_{0}^{1} \sin ^{-1}\left(\frac{2 x}{1+x^{2}}\right) d x$.
Substitute $x = \tan \theta$,then $d x = \sec ^{2} \theta d \theta$.
When $x = 0$,$\theta = 0$. When $x = 1$,$\theta = \frac{\pi}{4}$.
$I = \int_{0}^{\frac{\pi}{4}} \sin ^{-1}(\sin 2 \theta) \sec ^{2} \theta d \theta = \int_{0}^{\frac{\pi}{4}} 2 \theta \sec ^{2} \theta d \theta$.
Using integration by parts,$\int u v d \theta = u \int v d \theta - \int (u' \int v d \theta) d \theta$,where $u = \theta$ and $v = \sec^2 \theta$:
$I = 2 \left[ \theta \tan \theta - \int \tan \theta d \theta \right]_{0}^{\frac{\pi}{4}} = 2 [ \theta \tan \theta + \ln |\cos \theta| ]_{0}^{\frac{\pi}{4}}$.
Evaluating at the limits:
$I = 2 \left[ \frac{\pi}{4} \tan \frac{\pi}{4} + \ln |\cos \frac{\pi}{4}| - (0 + \ln |\cos 0|) \right] = 2 \left[ \frac{\pi}{4} + \ln \frac{1}{\sqrt{2}} - 0 \right]$.
Since $\ln \frac{1}{\sqrt{2}} = -\frac{1}{2} \ln 2$:
$I = 2 \left[ \frac{\pi}{4} - \frac{1}{2} \ln 2 \right] = \frac{\pi}{2} - \ln 2$.